package cn.com.smart.module.tool.database.controller;

import cn.com.smart.framework.web.controller.BaseController;
import cn.com.smart.module.tool.database.domain.tables;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/system/databsae/")
public class TablesController extends BaseController {

    @Autowired
    private cn.com.smart.module.tool.database.service.tableservice tableservice;

    /**
     * 根据数据库名查询所有表名
     * @return
     */
    @GetMapping("/tablesList")
    @ResponseBody
    public List<tables> tablesBylibrary(){
        return tableservice.tablesBylibrary();
    }

}
